#include <iostream>

#include <event_cpp/loop.h>
#include <event_cpp/timer_event.h>

using namespace std;
using namespace lumi;
using namespace lumi::event_cpp;

void TimerCallback()
{
    cout << "." << flush;
}

int main()
{
    LoopSptr sp_loop = Loop::New(Loop::kLibeventType);

    TimerEventSptr sp_timer = sp_loop->newTimerEvent();
    sp_timer->initialize(time_interval::Millisecond(200), Event::kPersistMode);
    sp_timer->setCallback(TimerCallback);
    sp_timer->enable();

    sp_loop->runLoop(Loop::kLoopForever);
    return 0;
}
